<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("faithwar", $con);
date_default_timezone_set("PRC"); //timezone
#$dateTime = date("Y-m-d",strtotime("-1 day"));
$dateTime = date("Y-m-d");

mysql_query("DELETE FROM faithwar_query WHERE firstlogin< '2012-07-20' or firstlogin >'$dateTime'");
//mysql_query("DELETE FROM faithwar_query WHERE dataTime< '2012-07-20' or dataTime >'$dateTime'");
mysql_close($con);
?>